require "sneak/flaggeable_methods"
require "sneak/sneak_methods"

module Sneak
  module ActiveRecordExtension

    def is_flaggeable
      has_many :flags, :as => :flaggeable, :dependent => :destroy
      accepts_nested_attributes_for :flags

      include FlaggeableMethods
    end


    def acts_as_sneak
      has_many :flags, :as => :sneak
      accepts_nested_attributes_for :flags

      include SneakMethods
    end
  end
end